<?php
/**
 * Update Controller for Render  Component
 *
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

/**
 * Render Update Controller

 */
class RendersControllerUpdate extends RendersController
{
	/**
	 * constructor (registers additional tasks to methods)
	 * @return void
	 */
	function __construct()
	{
		parent::__construct();		
	}
	

	/**
	 * save a record (and redirect to main page)
	 * @return void
	 */
	function save()
	{
                JRequest::setVar( 'view', 'update' );
		JRequest::setVar( 'layout', 'default'  );
		JRequest::setVar('hidemainmenu', 1);

		parent::display();
		$model = $this->getModel('update');
                /*
		if ($model->store($post)) {
			$msg = JText::_( 'Image Saved!' );
		} else {
			$msg = JText::_( 'Error Saving Image' );
		}

                 *
                 */
		// Check the table in so it can be edited.... we are done with it anyway
		$link = 'index.php?option=com_render&coltroller=update&view=update';
		$this->setRedirect($link, $msg);
	}
	
	/**
	 * cancel editing a record
	 * @return void
	 */
	function cancel()
	{
		$msg = JText::_( 'Operation Cancelled' );
		$this->setRedirect( 'index.php?option=com_render&coltroller=update&view=update', $msg );
	}
}